package cn.com.cym.gamezao.entity.xmu.recruit;

import cn.com.cym.gamezao.base.BaseEntity;
import cn.com.cym.gamezao.entity.authorize.User;
import cn.com.cym.gamezao.entity.xmu.Recruit;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.lang.NonNull;

import javax.persistence.*;
import java.io.Serializable;
import java.time.LocalDate;


@Setter
@Getter
@NoArgsConstructor
@Table(name = "x_lean_experience")
@Entity
@Accessors(chain = true)
@ApiModel(description = "求学经历")
public class LearnExperience extends BaseEntity implements Serializable {
    private static final long serialVersionUID = 4250309134342117531L;


    @ManyToOne
    @JoinColumn(name = "user_id")
    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
    private User user;

    @JsonFormat(pattern = "yyyy-MM-dd",timezone="GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(name = "startDate",value = "开始时间",dataType = "LocalDate")
    @NonNull
    private LocalDate startDate;

    @JsonFormat(pattern = "yyyy-MM-dd",timezone="GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(name = "endDate",value = "结束时间",dataType = "LocalDate")
    private LocalDate endDate;

    /**
     * 学历
     */
    @Column(length = 4)
    @ApiModelProperty(name = "education",value = "学历",dataType = "String")
    private String education;

    /**
     * 学校
     */
    @Column(length = 48)
    @ApiModelProperty(name = "school",value = "学校",dataType = "String")
    private String school;


    /**
     * 专业
     */
    @Column(length = 48)
    @ApiModelProperty(name = "profession",value = "专业",dataType = "String")
    private String  profession;


    /**
     * 学位
     */
    @Column(length = 4)
    @ApiModelProperty(name = "degree",value = "学位",dataType = "String")
    private String degree;


    /**
     * 是否最高学历
     */
    @ApiModelProperty(name = "upperEducation",value = "是否最高学历",dataType = "Boolean")
    private Boolean upperEducation;


    /**
     * 是否最高学位
     */
    @ApiModelProperty(name = "upperDegree",value = "是否最高学位",dataType = "Boolean")
    private Boolean upperDegree;


    @JsonFormat(pattern = "yyyy-MM-dd",timezone="GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(name = "gainDate",value = "（预计）获取日期",dataType = "LocalDate")
    private LocalDate gainDate;

    @Column(length = 32)
    @ApiModelProperty(name = "country",value = "学位国家",dataType = "String")
    private String country;

    @Column(length = 20)
    @ApiModelProperty(name = "learnForm",value = "学习形式",dataType = "String")
    private String learnForm;

    @Column(length = 20)
    @ApiModelProperty(name = "cultureType",value = "培养类型",dataType = "String")
    private String cultureType;

}
